package com.ruoyi.api.controller;

import com.ruoyi.api.service.IDictRegionService;
import com.ruoyi.common.core.domain.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 省市区
 *
 * @author 寻觅
 * @since 2025-05-27
 */
@RestController
@RequestMapping("/dict/region")
public class DictRegionController {

    @Autowired
    IDictRegionService iDictRegionService;

    /**
     * 地址树状结构
     * @return
     */
    @GetMapping("/treeList")
    public AjaxResult getLandmark() {
        return AjaxResult.success(iDictRegionService.getlist());
    }

}
